import request from '@/utils/request'

// 查询新闻列表
export function listArtical(query) {
  return request({
    url: '/web/artical/list',
    method: 'get',
    params: query
  })
}

// 查询新闻详细
export function getArtical(id) {
  return request({
    url: '/web/artical/' + id,
    method: 'get'
  })
}

// 新增新闻
export function addArtical(data) {
  return request({
    url: '/web/artical',
    method: 'post',
    data: data
  })
}

// 修改新闻
export function updateArtical(data) {
  return request({
    url: '/web/artical',
    method: 'put',
    data: data
  })
}

// 删除新闻
export function delArtical(id) {
  return request({
    url: '/web/artical/' + id,
    method: 'delete'
  })
}

// 导出新闻
export function exportArtical(query) {
  return request({
    url: '/web/artical/export',
    method: 'get',
    params: query
  })
}